﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace WPF人员管理8
{
    /// <summary>
    /// 自定义一个按钮类
    /// </summary>
    class MyButton:Button
    {
        // 声明依赖属性  
        public static readonly DependencyProperty ButtonCornerRadiusProperty =
           DependencyProperty.Register("ButtonCornerRadius", typeof(CornerRadius), typeof(MyButton));

        public CornerRadius ButtonCornerRadius
        {
            get { return (CornerRadius)GetValue(ButtonCornerRadiusProperty); }
            set { SetValue(ButtonCornerRadiusProperty, value); }
        }

        public Brush MourseOverHolder
        {
            get { return (Brush)GetValue(MourseOverHolderProperty); }
            set { SetValue(MourseOverHolderProperty, value); }
        }

        public static readonly DependencyProperty MourseOverHolderProperty =
            DependencyProperty.Register("MourseOverHolder", typeof(Brush), typeof(MyButton));

        public Brush MoursePresedHolder
        {
            get { return (Brush)GetValue(MoursePresedHolderProperty); }
            set { SetValue(MoursePresedHolderProperty, value); }
        }

        public static readonly DependencyProperty MoursePresedHolderProperty =
            DependencyProperty.Register("MoursePresedHolder", typeof(Brush), typeof(MyButton));

    }
}
